<?php
session_start();
$_SESSION['nick']="";
//requerimientos--------------------------------
require '../../../MApache/weblinx/weblinx.php';
require '../Forms/FrmTerminal.php';
require '../Forms/FrmAbout.php';
require '../Forms/FrmMenu.php';
require '../Forms/FrmInformation.php';
require '../Forms/FrmHelp.php';
require("../Classes/Setter.php");
//----------------------------------------------

//Creación Setter
$setter=new Setter($configurationsPath="../Config");

//Creación de objeto Ajax
$ajax=new Ajax();
$ajax->setImageLoading($imageLoading="../../../MApache/weblinx/Images/ajax_loader2.gif");

//Objetos necesarios de presentación
$stack=new Stack($basicCommandsPath="../Data");
$stack->loadBasicCommands();
$frmTerminal=new FrmTerminal();
$page=new Page();
$page->setBodyEvents(array("onload"=>'"mueveReloj()"', "onkeyup"=>'"keypressed(event)"'));
$page->setCss("../Themes/".$setter->getTheme()."/skin.css");
//-----------------------

//Inicio de página-----
$page->start();
$ajax->activate();
$ajax->GETMethodSend();
$ajax->POSTMethodSend();
$ajax->tableInfoPOSTMethodSend();
$stack->activate(TRUE);
$page->headEnd();
$page->bodyStart();
//---------------------
if($_GET['start']=="yes"){
    $_SESSION['nick']=$_GET['nick'];
    $_SESSION['sections']=$_GET['sections'];
    
    $frmTerminal->setInformation(".::   ".$_GET['nick']."   ::.");
    $frmTerminal->setVisible($visible=TRUE);

}
else if($_POST['commandToServer']=="about"){
    $frmAbout=new FrmAbout();
    $frmAbout->setVisible(true);
}
else if($_POST['commandToServer']=="menu"){
    $frmMenu=new FrmMenu();
    $frmMenu->setVisible(true);
}else if($_POST['commandToServer']=="help"){
    $frmHelp=new FrmHelp();
    $frmHelp->setVisible(true);
}

//Fin de página-------
//$page->end();
//--------------------
?>
